<?php if (isset($_SESSION['user_pw'])) {
$login=new Control_Model_Table_Login();
$login->chek();
    echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php
echo Control_View_Helper_EnableElRTE::enableElRTE();
echo Control_View_Helper_EnableElFinder::enableElFinder();

        $this->headMeta()
                ->setHttpEquiv('Content-type', 'text/html; charset=utf-8')
                ->appendName('copyright', 'Portfolio');
        $this->headMeta()
                ->appendName('description', 'Portfolio');
        $this->headMeta()
                ->appendName('keywords', 'Portfolio');
        echo $this->headMeta();
        echo $this->headTitle();
        echo $this->headLink();
        echo $this->headScript();
//              echo $this->JQuery()
//                      ->enable()
//                      ->uiEnable()
//                      ->setLocalPath('/scripts/jquery/jquery-1.4.2.min.js')
//                      ->setUiLocalPath('/scripts/jquery/ui/jquery-ui-1.8.5.custom.min.js')
//                      ->addStylesheet(
//                              '/css/jquery/ui/default/jquery-ui-1.8.5.custom.css'
//              ); ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/css/layout.css" rel="stylesheet" type="text/css" />
<link href="/css/wysiwyg.css" rel="stylesheet" type="text/css" />

<!-- Theme Start -->
<link href="/themes/blue/styles.css" rel="stylesheet" type="text/css" />
<!-- Theme End -->
</head>
<body id="homepage">
	<div id="header">
    	<a href="/control/" title=""><img SRC="/img/cp_logo.png" alt="Control Panel" class="logo" /></a>
    	<div id="searcharea">
            <p class="left smltxt"><a href="#" title="">Advanced</a></p>
            <input type="text" class="searchbox" value="Search control panel..." onclick="if (this.value =='Search-2520control-2520panel..-2E'){this.value=''}"/>
            <input type="submit" value="Search" class="searchbtn" />
        </div>
    </div>

    <!-- Top Breadcrumb Start -->
    <div id="breadcrumb">
    	<ul>
        	<li><img SRC="/img/icons/icon_breadcrumb.png" alt="Location" /></li>
        	<li><strong>Location:</strong></li>

                <li><a href="http://<?php //echo $_SERVER['HTTP_HOST']; ?>" title=""><?php // echo $_SERVER['HTTP_HOST']; ?></a></li>
            <li>/</li><li><a href="/control/" title="">Control Panel</a></li><li>/</li>
            <li><?php if (isset($this->controller)) {echo $this->controller;}//echo substr($_SERVER['REQUEST_URI'],'9'); ?></li>
        </ul>
    </div>
    <!-- Top Breadcrumb End -->



    
    <!-- Right Side/Main Content Start -->
    <div id="rightside">
<?php
echo '<script type="text/javascript">
     $().ready(function() {
          // создаем редактор
          $(\'.elrte\').elrte(opts);
     });
</script>';
echo $this->layout()->content; ?>

        <!-- Content Box End -->
        <div id="footer">
        	&copy; Copyright 2010 Your Company Name
        </div>

    </div>
    <!-- Right Side/Main Content End -->


        <!-- Left Dark Bar Start -->
    <div id="leftside">
    	<div class="user">
        	<img SRC="/img/avatar.png" width="44" height="44" class="hoverimg" alt="Avatar" />
            <p>Logged in as:</p>
            <p class="username"><?php echo $_SESSION['name'] ?></p>
            <p class="userbtn"><a href="/control/index/users/" title="">Profiles</a></p>
            <p class="userbtn"><a href="/control/index/check-lock/logout/1/" title="">Log out</a></p>
        </div>
<?php echo $this->action('count', 'messages', 'control'); ?>
<?php echo $this->action('admin-menu', 'index', 'control'); ?>
    </div>
    <!-- Left Dark Bar End -->

    <!-- Notifications Box/Pop-Up Start -->
<?php echo $this->action('pop', 'messages', 'control'); ?>
    <!-- Notifications Box/Pop-Up End -->

    <script type="text/javascript" SRC="http://dwpe.googlecode.com/svn/trunk/_shared/EnhanceJS/enhance.js"></script>
    <script type='text/javascript' SRC="http://dwpe.googlecode.com/svn/trunk/charting/js/excanvas.js"></script>
<!--	<script type='text/javascript' SRC="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>-->
    <script type='text/javascript' SRC="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"></script>
	<script type='text/javascript' SRC="/js/jquery.wysiwyg.js"></script>
    <script type='text/javascript' SRC="/js/visualize.jQuery.js"></script>
    <script type="text/javascript" SRC="/js/functions.js"></script>

    <!--[if IE 6]>
    <script type='text/javascript' src='scripts/png_fix.js'></script>
    <script type='text/javascript'>
      DD_belatedPNG.fix('img, .notifycount, .selected');
    </script>
    <![endif]-->
</body>
</html>
<?php }
else {
echo $this->action('lock-page', 'index', 'control');
}